package com.sherry.request;

import com.qingqing.workbooksvc.proto.WorkBookSvcWrongBookProto.WorkbooksvcPtWrongBookListV1Request;
import com.qingqing.workbooksvc.proto.WorkBookSvcWrongBookProto.WorkbooksvcPtWrongBookListV1Response;
import com.sherry.base.HeaderMap;
import com.sherry.base.ResponseParseUtil;
import com.sherry.base.TestBase;

import java.io.ByteArrayOutputStream;
import java.util.HashMap;

/**
 * Created by swl on 2020/8/20.
 */
public class WrongBookListRequest {

    public void studentCommonRequest(String url, int studentId, WorkbooksvcPtWrongBookListV1Request request, int errorCode) {
        HashMap<String,String> header = HeaderMap.addStuHeader(studentId);

        ByteArrayOutputStream buf = TestBase.doJsonPost(request,url,header);
//        WorkbooksvcPtWrongBookListV1Response resp1 = ResponseResult.getResponse(buf,WorkbooksvcPtWrongBookListV1Response.class);
        WorkbooksvcPtWrongBookListV1Response resp = ResponseParseUtil.convertToProtoResponse(buf,WorkbooksvcPtWrongBookListV1Response.class);

//        Assert.assertEquals(resp.getResponse().getErrorCode(),errorCode);
    }
}
